// 客户相关类型

// 客户信息
export interface Customer {
  customerId: number
  companyName: string
  legalPerson?: string
  customerName: string
  phone?: string
  source: number
  level: number
  progressStage: number
  createBy?: number
  createTime: Date
  updateBy?: number
  updateTime: Date
}

// 客户查询参数
export interface CustomerSearch {
  companyName?: string
  customerName?: string
  phone?: string
  source?: number
  level?: number
  progressStage?: number
  beginTime?: Date
  endTime?: Date
}

// 客户状态枚举
export enum CustomerSource {
  OFFICIAL_WEBSITE = 1, // 官网
  RECOMMENDATION = 2,    // 推荐
  EXHIBITION = 3        // 展会
}

export enum CustomerLevel {
  A = 1, // A级
  B = 2, // B级
  C = 3  // C级
}

export enum CustomerProgressStage {
  INITIAL_CONTACT = 1, // 初次接触
  BUSINESS_NEGOTIATION = 2, // 商务谈判
  QUOTATION_STAGE = 3,   // 报价阶段
  CONTRACT_SIGNED = 4     // 合同签署
}

// 客户选项
export const customerSourceOptions = [
  { label: '官网', value: CustomerSource.OFFICIAL_WEBSITE },
  { label: '推荐', value: CustomerSource.RECOMMENDATION },
  { label: '展会', value: CustomerSource.EXHIBITION }
]

export const customerLevelOptions = [
  { label: 'A级', value: CustomerLevel.A },
  { label: 'B级', value: CustomerLevel.B },
  { label: 'C级', value: CustomerLevel.C }
]

export const customerProgressStageOptions = [
  { label: '初次接触', value: CustomerProgressStage.INITIAL_CONTACT },
  { label: '商务谈判', value: CustomerProgressStage.BUSINESS_NEGOTIATION },
  { label: '报价阶段', value: CustomerProgressStage.QUOTATION_STAGE },
  { label: '合同签署', value: CustomerProgressStage.CONTRACT_SIGNED }
]